package de.greenrobot.daoexample.model;

import java.io.Serializable;

/**
 * Created by hy on 2016/4/1.
 */
public class DraftsPostItem implements Serializable, Comparable<DraftsPostItem> {
    private PostItem postItem;
    private long updateTime;
    private String type;

    public PostItem getPostItem() {
        return postItem;
    }

    public void setPostItem(PostItem postItem) {
        this.postItem = postItem;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime / 1000;
    }

    @Override
    public int compareTo(DraftsPostItem another) {
        return (int) (another.getUpdateTime() - updateTime);
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
